<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.10"></script>
</head>
<style>
  body {
    margin: 0;
    padding: 0;
  }



  .left {
    margin-left: 20px;
  }
</style>

<body>
  <div id="app">
    <table>
      <tr>
        <td>姓名：</td>
        <td>
          <input type="text" v-model="name">
        </td>
      </tr>
      <tr>
        <td>性别：</td>
        <td>
          <label for="man">男
            <input type="radio" name="" id="man" value="man" v-model="sex">
          </label>
          <label for="woman">女
            <input type="radio" name="" id="woman" value="woman" v-model="sex">
          </label>
        </td>
      </tr>
      <tr>
        <td>爱好：</td>
        <td>
          <label for="">

            <input type="checkbox" name="" id="" value="篮球" v-model="lover">
            篮球</label>
          <label for="">

            <input type="checkbox" name="" id="" value="唱歌" v-model="lover">
            唱歌 </label>
          <label for="">

            <input type="checkbox" name="" id="" value="写代码" v-model="lover">
            写代码 </label>
          <label for="">


        </td>
      </tr>
      <tr>
        <td>职业：</td>
        <td>
          <select name="" id="" multiple v-model="pro">
            <option value="老板">老板</option>
            <option value="软件工程师">软件工程师</option>
            <option value="老师">老师</option>
            <option value="教师">教师</option>
          </select>
        </td>
      </tr>
      <tr>
        <td>个人简介：</td>
        <td>
          <textarea name="" id="" v-model="info" cols="30" rows="10"></textarea>
        </td>
      </tr>
      <tr>
        <td>城市：</td>
        <td>
          <select name="" id="" v-model="city">
            <option value="厦门">厦门</option>
            <option value="北京">北京</option>

            <option value="福州">福州</option>
          </select>
        </td>
      </tr>
      <tr>
        <td colspan="2">
          <label for="agr">
            <input type="checkbox" name="" v-model="isAgree" id="agr">
            同意
          </label>
          <button :disabled="!isAgree" @click="isShow='true'">提交</button>
        </td>
      </tr>
    </table>
    <div class="left">
      <template v-if="isShow">
        <h1>您的个人信息是：</h1>
        <h2>用户名：{{name}}</h2>
        <h2>性别：{{sex}}</h2>
        <h2>爱好：{{lover}}</h2>
        <h2>职业：{{pro}}</h2>
        <h2>个人简介：{{info}}</h2>
        <h2>城市：{{city}}</h2>
      </template>
    </div>
  </div>
</body>
<script>
  new Vue({
    el: "#app",
    data() {
      return {
        name: '',
        sex: 'man',
        lover: [],
        pro: [],
        info: '喜欢唱跳',
        city: '北京',
        isAgree: false,
        isShow: false
      }
    }
  })
</script>

</html>